package com.html.lsfb;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@SpringBootApplication
@Controller
@RequestMapping("/hello")
public class HtmlApplication  {

    public static void main(String[] args) {
        SpringApplication.run(HtmlApplication.class, args);
    }

    @GetMapping("/50")
    public String five() {
        return "/50x";
    }

    @GetMapping("/test")
    @ResponseBody
    public String test() {
        return "test";
    }

    @GetMapping("/index")
    public String index() {
        return "/index";
    }

    @GetMapping("/404")
    public String fourToFour() {
        return "/error/404";
    }

    @GetMapping("/500")
    public String badRequest() {
        return "/error/500";
    }

}
